package com.channel.springcloud.model;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 
 * @TableName book
 */
public class Book implements Serializable {
    /**
     * id
     */
    private Integer id;

    /**
     * 分类
     */
    private Integer bookSortId;

    /**
     * 名称
     */
    private String name;

    /**
     * 描述
     */
    private String dscp;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 折扣
     */
    private Integer discount;

    /**
     * 版本
     */
    private String version;

    /**
     * 颜色
     */
    private String color;

    /**
     * 版本
     */
    private String suit;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 作者
     */
    private String author;

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    public Integer getId() {
        return id;
    }

    /**
     * id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 分类
     */
    public Integer getBookSortId() {
        return bookSortId;
    }

    /**
     * 分类
     */
    public void setBookSortId(Integer bookSortId) {
        this.bookSortId = bookSortId;
    }

    /**
     * 名称
     */
    public String getName() {
        return name;
    }

    /**
     * 名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 描述
     */
    public String getDscp() {
        return dscp;
    }

    /**
     * 描述
     */
    public void setDscp(String dscp) {
        this.dscp = dscp;
    }

    /**
     * 价格
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 价格
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * 折扣
     */
    public Integer getDiscount() {
        return discount;
    }

    /**
     * 折扣
     */
    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    /**
     * 版本
     */
    public String getVersion() {
        return version;
    }

    /**
     * 版本
     */
    public void setVersion(String version) {
        this.version = version;
    }

    /**
     * 颜色
     */
    public String getColor() {
        return color;
    }

    /**
     * 颜色
     */
    public void setColor(String color) {
        this.color = color;
    }

    /**
     * 版本
     */
    public String getSuit() {
        return suit;
    }

    /**
     * 版本
     */
    public void setSuit(String suit) {
        this.suit = suit;
    }

    /**
     * 数量
     */
    public Integer getCount() {
        return count;
    }

    /**
     * 数量
     */
    public void setCount(Integer count) {
        this.count = count;
    }

    /**
     * 状态
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 作者
     */
    public String getAuthor() {
        return author;
    }

    /**
     * 作者
     */
    public void setAuthor(String author) {
        this.author = author;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Book other = (Book) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBookSortId() == null ? other.getBookSortId() == null : this.getBookSortId().equals(other.getBookSortId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDscp() == null ? other.getDscp() == null : this.getDscp().equals(other.getDscp()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount()))
            && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
            && (this.getColor() == null ? other.getColor() == null : this.getColor().equals(other.getColor()))
            && (this.getSuit() == null ? other.getSuit() == null : this.getSuit().equals(other.getSuit()))
            && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getAuthor() == null ? other.getAuthor() == null : this.getAuthor().equals(other.getAuthor()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBookSortId() == null) ? 0 : getBookSortId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDscp() == null) ? 0 : getDscp().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
        result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
        result = prime * result + ((getColor() == null) ? 0 : getColor().hashCode());
        result = prime * result + ((getSuit() == null) ? 0 : getSuit().hashCode());
        result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAuthor() == null) ? 0 : getAuthor().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", bookSortId=").append(bookSortId);
        sb.append(", name=").append(name);
        sb.append(", dscp=").append(dscp);
        sb.append(", price=").append(price);
        sb.append(", discount=").append(discount);
        sb.append(", version=").append(version);
        sb.append(", color=").append(color);
        sb.append(", suit=").append(suit);
        sb.append(", count=").append(count);
        sb.append(", status=").append(status);
        sb.append(", author=").append(author);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}